package bsts.view.customer;

/**
 * not in use. Replaced by AcctManageWindow
 */

import java.awt.BorderLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

import javax.swing.JFrame;

import bsts.application.BSTSApplication;
import bsts.model.Customer;

public class DeactivateAcctWindow extends JFrame {

	private static final long serialVersionUID = 1L;

	private BSTSApplication manager;
	private JFrame container;
	private JFrame me;
	private DeactivateAcctPanel deactivateAcctPanel;

	private WindowListener windowListener = new WindowAdapter() {
		public void windowClosing(WindowEvent e) {
			manager.getViewManager().goBackMain(container);
		}
	};

	public DeactivateAcctWindow(BSTSApplication manager, JFrame container,
			Customer customer) {
		super("Billing System for Telephone Services");
		this.manager = manager;
		this.container = container;
		this.me = this;

		deactivateAcctPanel = new DeactivateAcctPanel(container, me, manager, customer);

		this.setLayout(new BorderLayout());
		this.add(deactivateAcctPanel, BorderLayout.CENTER);
		this.addWindowListener(windowListener);
	}

}
